import request from '@/router/axios';

export const getNoticeList = (current, size, params) => {
    return request({
      url: '/api/dis-dashboard/notice/list',
      method: 'get',
      params: {
        ...params,
        current,
        size,
      }
    })
}
export const getNewList = (current, size, params) => {
    return request({
      url: '/api/dis-dashboard/news/list',
      method: 'get',
      params: {
        ...params,
        current,
        size,
      }
    })
}
export const getHotList = (params) => {
    return request({
      url: '/gouxuan/search/search_top_text',
      method: 'get',
      params: {
        ...params
      }
    })
}
export const getRelateList = (params) => {
    return request({
      url: '/gouxuan/search/search_related_text',
      method: 'get',
      params: {
        ...params
      }
    })
}

export const getDownList = (current, size, params) => {
    return request({
      url: '/api/dis-dashboard/tool/list',
      method: 'get',
      params: {
        ...params,
        current,
        size,
      }
    })
}
//获取备忘录树
export const getNoteTree = (current, size, params) => {
    return request({
      url: '/api/dis-dashboard/note/group/list',
      method: 'get',
      params: {
        ...params,
        current,
        size,
      }
    })
}
//新增备忘录-分组
export const saveNoteParent = (data) => {
    return request({
      url: '/api/dis-dashboard/note/group/submit',
      method: 'post',
      data: data
    })
}
//删除备忘录-分组
export const delNoteParent = (data) => {
    return request({
      url: '/api/dis-dashboard/note/group/remove',
      method: 'post',
      params: {
        ...data,
      }
    })
}
//获取备忘录
export const getNoteList = (params) => {
    return request({
      url: '/api/dis-dashboard/note/list',
      method: 'get',
      params: {
        ...params,
      }
    })
}
//新增备忘录-分组
export const saveNote = (data) => {
    return request({
      url: '/api/dis-dashboard/note/submit',
      method: 'post',
      data: data
    })
}
//删除备忘录-分组
export const delNote = (data) => {
    return request({
      url: '/api/dis-dashboard/note/remove',
      method: 'post',
      params: {
        ...data,
      }
    })
}

//获取问题类型数据字典
export const getDataDicList = (code) => {
    return request({
      url: '/api/dis-sys/dict/dictionary?code=message_category',
      method: 'get'
    })
}

//保存留言
export const submitMessage = (data) => {
    return request({
      url: '/api/dis-dashboard/message/submit',
      method: 'post',
      data: data
    })
}



//新闻轮播图
export const getNewsSwiper = () => {
    return request({
      url: '/api/dis-dashboard/news/top',
      method: 'get'
    })
}
//指标数据 getIndicator
export const getIndicator = () => {
  return request({
    url: '/api/dis-report/indexDataController/quota',
    method: 'get'
  })
}
